<template>
	<view class="indexBox">
		<view class="item" v-for="(item, index) in itemlist" :key="index" @click="nextpage(item)">
			<text class="item__name">{{ item.name }}</text>
			<text class="item__icon iconfontPT iconxiayibu"></text>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			itemlist: [
				{
					name: '商品分类管理',
					url: '/pages/shopmanager/goodsManager/classmanager'
				},
				{
					name: '单品管理',
					url: '/pages/shopmanager/goodsManager/goodmanager'
				},
				{
					name: '套餐管理',
					url: '/pages/shopmanager/meal/mealManager'
				},
				{
					name: '优惠券管理',
					url: '/pages/shopmanager/discount/discountmanager'
				}
			]
		};
	},
	methods: {
		nextpage(item) {
			uni.navigateTo({
				url: item.url
			});
		}
	}
};
</script>

<style lang="less">
.indexBox {
	padding: 30rpx;

	.item {
		padding: 28rpx 0;
		display: flex;
		justify-content: space-between;
		align-items: center;

		& + .item {
			border-top: 1px solid rgba(199, 190, 190, 0.5);
		}

		&__name {
			color: #333;
			font-size: 28rpx;
		}

		&__icon {
			color: #999;
			font-size: 24rpx;
		}
	}
}
</style>
